﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ddcCajamarca.BusinessEntities.AgendaCultural;
using System.Data.Entity.ModelConfiguration;
using System.ComponentModel.DataAnnotations.Schema;
namespace ddcCajamarca.Repository.Mapping
{
    public class TipoEventoMap : EntityTypeConfiguration<TipoEvento>
    {
        public TipoEventoMap()
        {
            this.HasKey(e => e.Id);
            this.Property(e => e.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            this.Property(e => e.Nombre).HasColumnType("varchar").IsRequired().HasMaxLength(50);

            this.ToTable("TipoEvento");
            this.Property(e => e.Id).HasColumnName("IdTipoEvento");
            this.Property(e => e.Descripcion).HasColumnName("DescripcionTipoEvento");

        }
    }
}
